package com.ruoyi.business.sundry.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ruoyi.business.base.JoBaseService;
import com.ruoyi.business.base.PageParam;
import com.ruoyi.business.sundry.domain.JbPerformance;
import com.ruoyi.business.sundry.domain.vo.*;

import java.math.BigDecimal;
import java.util.List;

/**
 * 绩效Service接口
 *
 * @author ruoyi
 * @date 2024-10-11
 */
public interface JbPerformanceService extends JoBaseService<JbPerformance>
{
    /**
     * 各种类型数据汇总
     * @param performance
     * @return
     */
    BigDecimal getTargetTotal(JbPerformance performance);

    /**
     * 分页查询，转化名称
     * @param page
     * @param jbPerformance
     * @return
     */
    IPage<JbPerformanceVo> listPage(PageParam page, JbPerformance jbPerformance);

    /**
     * 添加多条数据
     * @param jbPerformances
     * @return
     */
    Boolean saveInfo(JbPerformanceVo jbPerformances);

    /**
     * 员工业绩统计
     * @param page
     * @param jbPerformance
     * @return
     */
    IPage<JbUserPerformanceVo> userPerformancePage(PageParam page, JbUserPerformanceVo jbPerformance);

    /**
     * 员工业绩统计，导出
     * @param jbPerformance
     * @return
     */
    List<JbUserPerformanceVo> exportUserPerformance(JbUserPerformanceVo jbPerformance);

    /**
     * 员工提成统计
     * @param page
     * @param jbPerformance
     * @return
     */
    IPage<JbUserCommissionVo> userCommissionPage(PageParam page, JbUserCommissionVo jbPerformance);
    /**
     * 员工提成统计
     * @param page
     * @param jbPerformance
     * @return
     */
    JbUserCommissionVo userCommissionPageSum(JbUserCommissionVo jbPerformance);

    /**
     * 员工业绩统计，导出
     * @param jbPerformance
     * @return
     */
    List<JbUserCommissionVo> exportCommission(JbUserCommissionVo jbPerformance);

    /**
     * 工作台，成交金额前10名，和目标数据
     * @return
     */
    IPage<PerformanceRankingVo> performanceRanking(PageParam pageParam);

    /**
     * 业绩排行
     * @param page
     * @param jbUserCommissionVo
     * @return
     */
    List<JbUserCommissionVo> performanceRankingData(PageParam page, JbUserCommissionVo jbUserCommissionVo);

    /**
     * app 个人和部门业绩排名
     * @param param
     * @param jbPerformance
     * @return
     */
    IPage<JbStatisticsPerformanceVo> appPersonageList(PageParam param,JbPerformance jbPerformance);

    /**
     * app 个人和部门订单排序
     * @param param
     * @param jbPerformance
     * @return
     */
    IPage<JbStatisticsPerformanceVo> appPersonageOrderList(PageParam param, JbPerformance jbPerformance);
    /**
     * app 个人和部门回款排序
     * @param param
     * @param jbPerformance
     * @return
     */
    IPage<JbStatisticsPerformanceVo> appPersonageReceivablesList(PageParam param, JbPerformance jbPerformance);
    /**
     * app 业务新增时间数据
     * @param param
     * @param jbPerformance
     * @return
     */
    List<JbStatisticsPerformanceVo> appBusinessTimeList(PageParam param, JbStatisticsPerformanceVo jbPerformance);
    /**
     * app 业务新增人员数据
     * @param param
     * @param jbPerformance
     * @return
     */
    IPage<JbStatisticsPerformanceVo> businessPersonageList(PageParam param, JbStatisticsPerformanceVo jbPerformance);


}
